#ifndef _UO_HASHTABLE_H_
#define _UO_HASHTABLE_H_
#endif

#define HASHSIZE 1000
#define HASHSKIP 57

#include <string.h>
#include "mpi.h"
#define TYPE_BIT 100
#define TYPE_INT 101
#define TYPE_CHAR 102
#define TYPE_FLOAT 103
#define TYPE_DOUBLE 104

struct hashElement{
	int tag;
	char name[16];
	int type;
	int size[3];
	int loc;
	int dim;
	void* addr;
}elements[HASHSIZE];

int hashLocate(char* newArray);

//Find an element in hashtable, return -1 if it doesn't exist, otherwise the index in the struct array. 
int hashGet(char* newArray);

//Put an element in hashtable, return -1 if it exists already, otherwise return 0.
int hashPut(char* newArray, int type, int* size, int dimension);



